package com.wky.system.service.impl;

import com.wky.basic.Result.PageResult;
import com.wky.basic.service.impl.BaseServiceImpl;
import com.wky.org.mapper.DepartmentMapper;
import com.wky.org.mapper.EmployeeMapper;
import com.wky.org.pojo.Department;
import com.wky.org.pojo.Employee;
import com.wky.org.service.DepartmentService;
import com.wky.system.mapper.SystemDetailMapper;
import com.wky.system.mapper.SystemTypeMapper;
import com.wky.system.pojo.SystemDetail;
import com.wky.system.pojo.SystemType;
import com.wky.system.service.SystemDetailService;
import com.wky.system.service.SystemTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class SystemTypeServicerImpl extends BaseServiceImpl<SystemType> implements SystemTypeService {

    @Autowired
    private SystemDetailMapper systemDetailMapper;
    @Autowired
    private SystemTypeMapper systemTypeMapper;

    /**
     * 根据字典类型id查询字典明细
     * @param typesId
     * @return
     */
    @Override
    public List<SystemDetail> findByTypesId(Long typesId) {
        return systemDetailMapper.findByTypesId(typesId);
    }

    /**
     * 删除
     *
     * @param id
     */
    public void delete(Long id) {
        systemDetailMapper.deleteByTypesId(id);
        systemTypeMapper.delete( id);
    }
}
